<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>判断四季 3-5 春 6-8夏9-11秋12-2 冬</title>
</head>

<body>
    <script>
        var a = 8;
        if (a <= 12 && a > 0) {
            if (a > 8 && a <= 11) {
                console.log("秋");
            } else if (a > 5) {
                console.log("夏");
            } else if (a > 2) {
                console.log("春");
            } else {
                console.log("冬");
            }
        }
    </script>
</body>

</html>